package com.xuecheng.content.convert;

import com.xuecheng.api.content.model.dto.CourseTeacherDTO;
import com.xuecheng.api.content.model.vo.CourseTeacherVO;
import com.xuecheng.content.entity.CourseTeacher;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CourseTeacherConvert {

    CourseTeacherConvert INSTANCE = Mappers.getMapper(CourseTeacherConvert.class);

    @Mapping(source = "courseTeacherId",target = "id")
    CourseTeacher dto2po(CourseTeacherDTO teacherDTO);
    @Mapping(source = "id",target = "courseTeacherId")
    CourseTeacherDTO po2dto(CourseTeacher teacher);

    List<CourseTeacherDTO> pos2dtos(List<CourseTeacher> teachers);

    List<CourseTeacher> dtos2pos(List<CourseTeacherDTO> teacherDTOs);

    CourseTeacherDTO vo2to(CourseTeacherVO courseTeacherVO);
}
